package net.nampham.visioncontrol.model;

public class Vec2 {
	public float x;
	public float y;
	
	public Vec2(float x, float y){
		this.x = x;
		this.y = y;
	}
	
	public Vec2 add(Vec2 other){
		return new Vec2(x+ other.x, y+ other.y);
	}

	public Vec2 dec(Vec2 other){
		return new Vec2(x- other.x, y- other.y);
	}
	
	public Vec2 mul(float scalar){
		return new Vec2(x*scalar, y*scalar);
	}
	
	public Vec2 div(float scalar){
		return new Vec2(x/scalar, y/scalar);
	}
	
	public boolean equals(Vec2 other){
		return (x==other.x && y==other.y);
	}
}
